<?php

namespace app\common\validate;

use app\common\RootValidate;

class SourceValidate extends RootValidate
{
    protected $rule = [
        'id' => 'require',
        'state' => 'require',
        'title' => 'require',
        'name' => 'require',
        'domain' => 'require',
    ];

    protected $message = [
        'id.require' => '内容来源无效',
        'state.require' => '请选择来源状态',
        'title.require' => '请选择输入中文名称',
        'name.require' => '请选择输入外语名称',
        'domain.require' => '请选输入来源域名',
    ];

    protected $scene = [
        'add' => ['state', 'name', 'domain'],
        'edit' => ['id', 'state', 'name', 'domain'],
    ];
}